<?php
$wsdlUrl = 'http://dts.kuaidihelp.com/webService/dts.php';
$client = new SoapClient($wsdlUrl);

$version = 'v1';
$format = 'xml';
$time_stamp = date("Y-m-d H:i:s");
$service_name = 'multinfo';
$express_company = 'sto';
$express_no = '227707711748';
$data['express_company'] = $express_company;
$data['deliver_no'] = $express_no;
$data['partner_name'] = 'kuaidihelp';
$secret_key = '11111111111111111111111';
ksort($data);
$separate = ',';
$massage = implode($separate, $data);
$massage .= $separate . $secret_key;
$token = md5($massage);

$request = '
<?xml version="1.0" encoding="UTF-8"?>
<request>
    <header>
            <service_name>' . $service_name . '</service_name>
            <partner_name>' . $data['partner_name'] . '</partner_name>
            <time_stamp>' . $time_stamp . '</time_stamp>
            <version>' . $version . '</version>
            <format>' . $format . '</format>
            <token>' . $token . '</token>
    </header>
    <body>
            <express_company>' . $express_company . '</express_company>
            <deliver_no>' . $express_no . '</deliver_no>
            <params>
                    <option>GetStatus</option>
                    <option>GetException</option>
                    <option>GetCompiler</option>
            </params>
    </body>
</request>';

$return = $client->exec($request);
var_dump($client->__getLastResponse(),$client->__getLastRequest(), $return);
